package data;

import java.io.FileNotFoundException;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import com.gusto.engine.repository.dao.impl.SemanticRepositoryDAO;
import com.gusto.engine.repository.exception.RepositoryException;

public class SemanticRepositoryLoadData {
	
	public static void main(String[] args) throws RepositoryException, FileNotFoundException {
		ApplicationContext factory = new ClassPathXmlApplicationContext("config-semantic.xml");
		SemanticRepositoryDAO dao = (SemanticRepositoryDAO)factory.getBean("semanticRepositoryDAO");
		
		String dataFolder = "src/test/resources/data/";
		
		dao.createRepository("repository-semantic");
		dao.emptyRepository();
		dao.loadFromRDF(dataFolder + "semantic-data.rdf");
	}
	
}
